package com.example.monitorsms.service;

import android.app.Service;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;

import com.example.monitorsms.utils.LogUtils;

public class MyService extends Service {

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        IntentFilter localIntentFilter = new IntentFilter("android.provider.Telephony.SMS_RECEIVED");
        localIntentFilter.setPriority(2147483647);
        SmsRecevier localMessageReceiver = new SmsRecevier();
        LogUtils.e("MyService");
        getApplicationContext().registerReceiver(localMessageReceiver, localIntentFilter);
    }
}
